package com.example.cursor_orm.model;

/**
 * 属性策略模型类
 * 对应数据库表: attribute_policy
 */
public class AttributePolicy {
    private Integer id;
    private Integer roleId;
    private Integer permissionId;
    private String attributeKey;
    private String attributeValue;

    // 构造函数
    public AttributePolicy() {}

    public AttributePolicy(Integer roleId, Integer permissionId, String attributeKey, String attributeValue) {
        this.roleId = roleId;
        this.permissionId = permissionId;
        this.attributeKey = attributeKey;
        this.attributeValue = attributeValue;
    }

    // Getter和Setter方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getPermissionId() {
        return permissionId;
    }

    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }

    public String getAttributeKey() {
        return attributeKey;
    }

    public void setAttributeKey(String attributeKey) {
        this.attributeKey = attributeKey;
    }

    public String getAttributeValue() {
        return attributeValue;
    }

    public void setAttributeValue(String attributeValue) {
        this.attributeValue = attributeValue;
    }

    @Override
    public String toString() {
        return "AttributePolicy{" +
                "id=" + id +
                ", roleId=" + roleId +
                ", permissionId=" + permissionId +
                ", attributeKey='" + attributeKey + '\'' +
                ", attributeValue='" + attributeValue + '\'' +
                '}';
    }
} 